package example.my_practice;

import example.entity.User;

import java.util.*;

/**
 * TODO
 *
 * @author zgq
 * @date 2020/10/28 21:01
 */
public class Practice02 {
    public static void main1(String[] args) {
        Map<String, User> map = new HashMap<>();
        if (Objects.isNull(map.get("2"))) {
            System.out.println("empty");
        }

        Map<String, String> map1 = new HashMap<>();
        map1.put("a", "a");
        map1.put("b", "b");
        System.out.println(map1);
        Map<String, String> map2 = new HashMap<>();
        map2.put("c", "c");
        map2.put("d", "d");
        map2.put("a", "aaa");
        map1.putAll(map2);
        System.out.println(map1);

        List<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        List<String> list2 = new ArrayList<>();
        list2.add("d");
        list2.add("e");
        list2.add("f");
        list.addAll(list2);
        System.out.println(String.join(",", list));
    }

    public static void main(String[] args) {
        User user = new User();
        user.setName("456");
    }

}
